
<html>
<head>
    <meta charset="UTF-8">
    <link href="https://cdn.bootcss.com/twitter-bootstrap/3.0.1/css/bootstrap.min.css" rel="stylesheet">
    <title>操作发生错误</title>
</head>
<body>

<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="alert alert-dismissable alert-warning">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                <h4>发生错误!</h4>
                <strong>${msg!""}</strong>
                <a id="jump" href="${url}" class="alert-link">3</a><span>秒后自动跳转原来页面</span>
            </div>
        </div>
    </div>
</div>

</body>


    <#--setTimeout(location.href="${url}",3000);-->
<script type="text/javascript">
    onload=function(){
        setInterval(go, 1000);
    };
    var x=3; //利用了全局变量来执行
    function go(){
        x--;
        if(x>0){
            document.getElementById("jump").innerHTML=x;  //每次设置的x的值都不一样了。
        }else{
            location.href="${url}";
        }
    }
</script>

</html>